<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>QQAS! {$Think.lang.acp}</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta content="Koogua Studio" name="Copyright" />
<load href="__TMPL__/Admin/Style/admincp.css" />
<load href="__TMPL__/Admin/Style/admincp.js" />
</head>
<body style="margin: 0px" scroll="no">
<div id="append_parent"></div>
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
    <tr>
        <td colspan="2" height="90">
            <div class="mainhd">
                <div class="logo">{$Think.lang.acp}</div>
                <div class="uinfo">
                    <p>{$Think.lang.welcome}, <em>{$_admin.username}</em> [ <a href="__APP__/Admin/Public/logout" target="_top">{$Think.lang.logout}</a> ]</p>
                    <p class="btnlink"><a href="{$_global.site_url}" target="_blank">{$Think.lang.homepage}</a></p>
                </div>
                <div class="navbg"></div>
                <div class="nav">
                    <ul id="topmenu">
                        <li><em><a href="#" id="tab_index" onclick="toggleMenu('index', 'Index/home');">{$Think.lang.tab_index}</a></em></li>
                        <li><em><a href="#" id="tab_settings" onclick="toggleMenu('settings', 'Config/general');">{$Think.lang.tab_settings}</a></em></li>
                        <li><em><a href="#" id="tab_categories" onclick="toggleMenu('categories', 'Category/manage');">{$Think.lang.tab_categories}</a></em></li>
                        <li><em><a href="#" id="tab_users" onclick="toggleMenu('users', 'User/userList');">{$Think.lang.tab_users}</a></em></li>
                        <li><em><a href="#" id="tab_teams" onclick="toggleMenu('teams', 'User/teamList');">{$Think.lang.tab_teams}</a></em></li>
                        <li><em><a href="#" id="tab_posts" onclick="toggleMenu('posts', 'Posts/searchQuestion');">{$Think.lang.tab_posts}</a></em></li>
                        <li><em><a href="#" id="tab_misc" onclick="toggleMenu('misc', 'Advertisement/adList');">{$Think.lang.tab_misc}</a></em></li>
                        <li><em><a href="#" id="tab_tools" onclick="toggleMenu('tools', 'Database/dbExport');">{$Think.lang.tab_tools}</a></em></li>
                    </ul>
                    <div class="currentloca"><p id="adminnav"></p></div>
                    <div class="navbd"></div>
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top" width="200" class="menutd">
            <div id="leftmenu" class="menu">
                <ul id="menu_settings" style="display: block">
                    <li><a href="__APP__/Admin/Config/general" target="main">{$Think.lang.menu_config_general}</a></li>
                    <li><a href="__APP__/Admin/Config/feature" target="main">{$Think.lang.menu_config_feature}</a></li>
                    <li><a href="__APP__/Admin/Config/optimize" target="main">{$Think.lang.menu_config_optimize}</a></li>
                    <li><a href="__APP__/Admin/Config/register" target="main">{$Think.lang.menu_config_register}</a></li>
                    <li><a href="__APP__/Admin/Config/displaying" target="main">{$Think.lang.menu_config_display}</a></li>
                    <li><a href="__APP__/Admin/Config/avatar" target="main">{$Think.lang.menu_config_avatar}</a></li>
                    <li><a href="__APP__/Admin/Config/point" target="main">{$Think.lang.menu_config_point}</a></li>
                    <li><a href="__APP__/Admin/Config/email" target="main">{$Think.lang.menu_config_email}</a></li>
                    <li><a href="__APP__/Admin/Config/captcha" target="main">{$Think.lang.menu_config_captcha}</a></li>
                    <li><a href="__APP__/Admin/Config/search" target="main">{$Think.lang.menu_config_search}</a></li>
                    <li><a href="__APP__/Admin/Config/auth" target="main">{$Think.lang.menu_config_auth}</a></li>
                    <li><a href="__APP__/Admin/Config/wap" target="main">{$Think.lang.menu_config_wap}</a></li>
                    <li><a href="__APP__/Admin/Config/attachment" target="main">{$Think.lang.menu_config_attachment}</a></li>
                </ul>
                <ul id="menu_categories" style="display:none">
                    <li><a href="__APP__/Admin/Category/manage" target="main">{$Think.lang.menu_category_manage}</a></li>
                    <li><a href="__APP__/Admin/Category/add" target="main">{$Think.lang.menu_category_add}</a></li>
                    <li><a href="__APP__/Admin/Category/merge" target="main">{$Think.lang.menu_category_merge}</a></li><li>
                </ul>
                <ul id="menu_users" style="display:none">
                	<li><a href="__APP__/Admin/Group/manageUserGroup" target="main">{$Think.lang.menu_manage_group}</a></li>
                    <li><a href="__APP__/Admin/User/userList" target="main">{$Think.lang.menu_manage_user}</a></li>
                    <li><a href="__APP__/Admin/User/addUser" target="main">{$Think.lang.menu_add_user}</a></li>
                    <li><a href="__APP__/Admin/User/approveUser" target="main">{$Think.lang.menu_approve_user}</a></li>
                    <li><a href="__APP__/Admin/User/searchUser" target="main">{$Think.lang.menu_search_user}</a></li>
                    <li><a href="__APP__/Admin/Blacklist/banUser" target="main">{$Think.lang.menu_ban_user}</a></li>
                    <li><a href="__APP__/Admin/Blacklist/banIP" target="main">{$Think.lang.menu_ban_ip}</a></li>
                    <li><a href="__APP__/Admin/Blacklist/disallowUsername" target="main">{$Think.lang.menu_disallow_username}</a></li>
                    <li><a href="__APP__/Admin/Blacklist/disallowEmail" target="main">{$Think.lang.menu_disallow_email}</a></li>
                </ul>
                <ul id="menu_teams" style="display:none">
                	<li><a href="__APP__/Admin/Team/teamList" target="main">{$Think.lang.menu_manage_team}</a></li>
                    <li><a href="__APP__/Admin/Team/approveTeam" target="main">{$Think.lang.menu_approve_team}</a></li>
                    <li><a href="__APP__/Admin/Team/configTeam" target="main">{$Think.lang.menu_config_team}</a></li>
                	<li><a href="__APP__/Admin/Team/manageTeamGroup" target="main">{$Think.lang.menu_manage_group}</a></li>
                    
                </ul>
                <ul id="menu_posts" style="display:none">
                    <li><a href="__APP__/Admin/Posts/questionList" target="main">{$Think.lang.menu_manage_question}</a></li>
                    <li><a href="__APP__/Admin/Posts/manageRecycleBin" target="main">{$Think.lang.menu_manage_recycle_bin}</a></li>
                    <li><a href="__APP__/Admin/Tag/tagList" target="main">{$Think.lang.menu_manage_tag}</a></li>
                    <li><a href="__APP__/Admin/Word/wordList" target="main">{$Think.lang.menu_word_censoring}</a></li>
                </ul>
                <ul id="menu_addons" style="display:none">
                    <li><a href="__APP__/Admin/Themes/configTheme" target="main">Manage themes</a></li>
                    <li><a href="__APP__/Admin/Themes/editTemplate" target="main">Manage templates</a></li>
                </ul>
                <ul id="menu_misc" style="display:none">
                    <li><a href="__APP__/Admin/Advertisement/adList" target="main">{$Think.lang.menu_manage_ad}</a></li>
                    <li><a href="__APP__/Admin/Announcement/announcementList" target="main">{$Think.lang.menu_manage_announce}</a></li>
                    <li><a href="__APP__/Admin/Navigation/navigationList" target="main">{$Think.lang.menu_manage_navigation}</a></li>
                    <li><a href="__APP__/Admin/Link/linkList" target="main">{$Think.lang.menu_manage_link}</a></li>
                    <li><a href="__APP__/Admin/Page/pageList" target="main">{$Think.lang.menu_manage_page}</a></li>
                    <li><a href="__APP__/Admin/Faq/faqList" target="main">{$Think.lang.menu_manage_faq}</a></li>
                    <li><a href="__APP__/Admin/Medal/medalList" target="main">{$Think.lang.menu_manage_medal}</a></li>
                </ul>
                <ul id="menu_tools" style="display:none">
                    <li><a href="__APP__/Admin/Database/dbExport" target="main">{$Think.lang.menu_manage_db}</a></li>
                    <li><a href="__APP__/Admin/Newsletter/newsletterList" target="main">{$Think.lang.menu_manage_newsletter}</a></li>
                    <li><a href="__APP__/Admin/Theme/editTemplate" target="main">{$Think.lang.menu_manage_tpl}</a></li>
                    <li><a href="__APP__/Admin/Sitemap/configure" target="main">{$Think.lang.menu_manage_sitemap}</a></li>
                    <li><a href="__APP__/Admin/Cron/cronList" target="main">{$Think.lang.menu_manage_cron}</a></li>
                    <li><a href="__APP__/Admin/Tools/refreshCache" target="main">{$Think.lang.menu_refresh_cache}</a></li>
                    <li><a href="__APP__/Admin/Tools/checkFilePermission" target="main">{$Think.lang.menu_check_file_perms}</a></li>
                    <li><a href="__APP__/Admin/Tools/phpinfo" target="main">{$Think.lang.menu_phpinfo}</a></li>
                </ul>
                <ul id="menu_index" style="display:none">
                    <li><a href="__APP__/Admin/Index/home" target="main">{$Think.lang.menu_dashbord}</a></li>
                </ul>
            </div>
        </td>
        <td valign="top" width="100%" class="mask">
            <iframe id="main" name="main" src="__APP__/Admin/Index/home" width="100%" height="100%" frameborder="0" scrolling="yes" style="overflow: visible;"></iframe>
        </td>
    </tr>
</table>

<div class="copyright">
    <p>Powered by&nbsp;&nbsp;<a href="{:get_site_config('software_link')}" target="_blank">{:get_site_config('software_name')}</a> {:get_site_config('software_version')}</p>
    <p>{:get_site_config('software_copyright')}, <a href="{:get_site_config('software_producer_link')}" target="_blank">{:get_site_config('software_producer')}.</a></p>
</div>

<script type="text/javascript">
var tabs = new Array('index', 'settings', 'categories', 'users', 'teams', 'posts', 'misc', 'tools');

function toggleMenu(key, url) {
    for(var k in tabs) {
        if(Q('menu_' + tabs[k])) {
            Q('menu_' + tabs[k]).style.display = tabs[k] == key ? '' : 'none';
        }
    }
    var lis = Q('topmenu').getElementsByTagName('li');
    for(var i = 0; i < lis.length; i++) {
        if(lis[i].className == 'navon') lis[i].className = '';
    }
    Q('tab_' + key).parentNode.parentNode.className = 'navon';
    if(url) {
        parent.main.location = '__APP__/Admin/' + url;
        var hrefs = Q('menu_' + key).getElementsByTagName('a');
        for(var j = 0; j < hrefs.length; j++) {
            hrefs[j].className = hrefs[j].href.indexOf(url) != -1 ? 'tabon' : (hrefs[j].className == 'tabon' ? '' : hrefs[j].className);
        }
    }
    return false;
}

function initCpMenus(menuContainerid) {
    var key = '';
    var hrefs = Q(menuContainerid).getElementsByTagName('a');
    for(var i = 0; i < hrefs.length; i++) {
        if(menuContainerid == 'leftmenu' && !key && hrefs[i].href.indexOf('Index/home') != -1) {
            key = hrefs[i].parentNode.parentNode.id.substr(5);
            hrefs[i].className = 'tabon';
        }
        hrefs[i].onclick = function() {
            if(menuContainerid != 'custommenu') {
                var lis = Q(menuContainerid).getElementsByTagName('li');
                for(var k = 0; k < lis.length; k++) {
                    if(lis[k].firstChild.className != 'menulink') lis[k].firstChild.className = '';
                }
                if(this.className == '') this.className = menuContainerid == 'leftmenu' ? 'tabon' : 'bold';
            }
        }
    }
    return key;
}
var header_key = initCpMenus('leftmenu');
toggleMenu(header_key ? header_key : 'index');
</script>

</body>
</html>
